using System;
using System.Linq.Expressions;

namespace Charisma.MongoDb.Linq.Expressions
{
  internal sealed class OrderExpression : MongoExpression
  {
    public FieldExpression FieldExpression { get; private set; }
    public bool Ascending { get; private set; }

    public OrderExpression(FieldExpression expression, bool ascending)
      : base(MongoExpressionType.Order, expression.Type)
    {
      FieldExpression = expression;
      Ascending = ascending;
    }
  }
}